package com.electric.electric.controller;

import com.electric.electric.Common.Result;
import com.electric.electric.POJO.VO.admin.SysUserVO;
import com.electric.electric.service.SysUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/admin")
public class SysUserController {

    @Autowired
    private SysUserService sysUserService;

    @GetMapping("/getUserInfo")
    public Result getUserInfo(@RequestParam Integer id) {
        log.info("查询用户详细信息...");
        SysUserVO sysUser = sysUserService.getUserInfo(id);
        System.out.println(sysUser);
        return Result.success(sysUser);
    }
}
